import request from '@/utils/request'

// 获取角色列表
export function getRoleList(params) {
  return request({
    url: '/auth/role/list',
    method: 'get',
    params
  })
};

// 获取角色详情
export function getRole(id) {
  return request({
    url: '/auth/role/get/' + id,
    method: 'get'   
  })
};

// 保存角色
export function saveRole(data) {
  return request({
    url: '/auth/role/save',
    method: 'post',
    data
  })
};

// 物理删除角色
export function deleteRole(id) {
  return request({
    url: '/auth/role/delete/' + id,
    method: 'delete'
  })
};

// 逻辑删除角色
export function deleteByLogic(id) {
  return request({
    url: '/auth/role/deleteByLogic/' + id,
    method: 'delete'
  })
};

// 获取角色下拉列表
export function getRoleSelectList() {
  return request({
    url: '/auth/role/getRoleSelectList',
    method: 'get'
  })
};
